//
//  PayHeadCell.m
//  PaiLeXiongProject
//
//  Created by 小獾科技 on 2017/8/31.
//  Copyright © 2017年 小獾科技. All rights reserved.
//

#import "PayHeadCell.h"

@implementation PayHeadCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.backgroundColor = COLOR_BACKGROUND;
        UIView *view = [UIView new];
        view.backgroundColor = ColorWhite;
        [self addSubview:view];
        [view mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self);
            make.left.and.right.equalTo(self);
            make.bottom.equalTo(self).offset(-10);
        }];
        
        _iv = [UIImageView new];
        _iv.image = IMAGE(@"");
        [view addSubview:_iv];
        [_iv mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(10);
            make.left.equalTo(self).offset(10);
            make.width.equalTo(@86);
            make.height.equalTo(@86);
        }];
        
        _priceLabel = [UILabel new];
        _priceLabel.text = @"￥580";
        _priceLabel.textColor = ColorFrom16(0xFF5B7A);
        _priceLabel.font = PFMFONT(18);
        [view addSubview:_priceLabel];
        [_priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(10);
            make.left.equalTo(_iv.mas_right).offset(15);
            make.width.greaterThanOrEqualTo(@30);
            make.height.equalTo(@25);
        }];
        
        _detaiLabel = [UILabel new];
        _detaiLabel.text = @"爱儿美儿童舞蹈秋季梦想儿童舞蹈";
        _detaiLabel.textColor = ColorFrom16(0x7F7E7D);
        _detaiLabel.font = PFRFONT(14);
        [view addSubview:_detaiLabel];
        [_detaiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(_priceLabel.mas_bottom).offset(15);
            make.left.equalTo(_iv.mas_right).offset(15);
            make.width.greaterThanOrEqualTo(@200);
            make.height.equalTo(@20);
        }];
        
        
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
